package com.groovy.learning

import groovy.text.GStringTemplateEngine
import groovy.text.SimpleTemplateEngine
import groovy.text.Template;

def text = 'Bonjour $stg1, $stg2, $stg3 a la formation groovy chez <% print enterprise %>.\n Bonne formation'

def binding = ["stg1":"prenom1", "stg2":"prenom2", "stg3":"prenom3", "enterprise":"DMR" ,"enterprise1":"DMR"]

def engine = new SimpleTemplateEngine()
template = engine.createTemplate(text).make(binding)

println template.toString();

